home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette: SID64
/
SID64.D64
/
sid copier.64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
59 lines
100 print chr$(147):print " sidplayer file copy utility"
110 print " by craig chamberlain ":print
120 sa=780:sp=783:da=5358:wp=5362:fr=5363:cc=5364:ct=5365:le=5374
130 di=4377:se=4698:re=4841:wr=5089:li=5209:pr=5306
200 d$="3":print " insert source disk":print
210 print " 1 music files only":print " 2 music and word files
215 [153] " 3 music, word, and picture files":[153]
220 [153] " copy which file types (" d$ ") ? ";
222 [146] 198,15:[161] g$:[139] g$[178][199](13) [167] g$[178]d$
224 [139] g$[179]"1" [176] g$[177]"3" [137] 222
226 [153] g$:[151] wp,0:[139] g$[177]"1" [167] [151] wp,1:[139] g$[178]"3" [167] [151] wp,128
230 la[178][194](49)[170]256[172][194](50)[170]100:[151] da,la[171]256[172][181](la[173]256):[151] da[170]1,la[173]256
240 [153]:[158] di:[139] [194](cc)[178]0 [167] [153] " no music files on disk":[128]
250 [151] fr,([194](51)[170]256[172][194](52)[171][194](da[170]2)[171]256[172][194](da[170]3)[171]400)[173]253:[153]
260 [153] " enter names of files to copy
265 print " then enter 'begin' to start":print:poke ct,0
300 print peek(fr) "blocks free":print " copy #";:poke sa,peek(ct)+1:sys pr
305 i$="":k=fre(0):input i$:print:if i$="" then sys li:print:goto 300
310 if i$="begin" goto 400
320 mf=0:f$=i$:r$=right$(f$,4)
325 if not(r$=".mus" or r$=".wds" or r$=".pic") then mf=1:f$=f$+".mus"
330 l=len(f$):if l>16 then print " filename too long":print:goto 300
332 for k=1 to l:poke 571+k,asc(mid$(f$,k)):next:poke sa,l:sys se
334 on peek(sa)+1 goto 350,341,342,343
341 print " file not on disk":print:goto 300
342 print " file already selected":print:goto 300
343 print " not enough memory":print:goto 300
350 if mf=0 goto 300
352 poke 569+l,87:poke 570+l,68:poke sa,l:sys se
354 sf=0:on peek(sa) goto 370,370,395
360 sf=1
370 poke 569+l,80:poke 570+l,73:poke 571+l,67:poke sa,l:sys se
375 on peek(sa) goto 390,390,396
380 sf=sf or2
390 on sf+1 goto 300,391,392,393
391 print " music and word files selected":print:goto 300
392 print " music and picture files selected":print:goto 300
393 print " music, word, picture files selected":print:goto 300
395 print " not enough memory for words file":print:goto 300
396 print " not enough memory for picture file":print:goto 300
400 if peek(ct)=0 then print " no files selected":print:goto 300
410 open 2,8,15,"i0:":input#2,a,b$,c,d:if a goto 710
420 sys re:print:if peek(sp)and1 goto 700
500 print " insert destination disk":print " and press any key":poke 198,0
505 wait 198,15:get g$:print:print#2,"i0:":input#2,a,b$,c,d:if a goto 710
510 for k=1 to peek(ct)
520 poke sa,k:sys wr:if (peek(sp)and1)=0 goto 550
530 input#2,a,b$,c,d:if a<>63 then print:goto 710
532 print:print " error: " b$:print:print " okay to replace? ";
534 wait 198,15:get g$:if g$="n" then print "no":print:goto 550
536 if g$<>"y" goto 534
540 print "yes":print:f$="":for j=1 to peek(le)-4:f$=f$+chr$(peek(571+j)):next
542 print " scratching " f$:print
544 print#2,"s0:"+f$:input#2,a,b$,c,d:if a>1 goto 710
546 j=fre(0):goto 520
550 next:close 2:print:print " copying completed":end
700 input#2,a,b$,c,d
710 print " error: " b$:close 2:end